using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.ICM
{
	[DataContract, Table("IcmMasPurchaseMapping")]
    public class MasPurchaseMapping
    {
        public MasPurchaseMapping()
        {
            this.MasCommitteeMappings = new HashSet<MasCommitteeMapping>();
        }
    

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "PcMapId", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public int PcMapId { get; set; }

        [ForeignKey("MasPurchaseMethod")]
		[DataMember, Display(Name = "PcMethodId", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public int PcMethodId { get; set; }

		[DataMember, Display(Name = "PcMapDescr", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public string PcMapDescr { get; set; }

        [ForeignKey("MasPurchaseRegular")]
		[DataMember, Display(Name = "PcRuleId", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public int PcRuleId { get; set; }

		[DataMember, Display(Name = "AmountType", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public string AmountType { get; set; }

		[DataMember, Display(Name = "MinAmount", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public Nullable<double> MinAmount { get; set; }

		[DataMember, Display(Name = "MaxAmount", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public Nullable<double> MaxAmount { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.MasPurchaseMappingResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }


        [DataMember]
        public virtual ICollection<MasCommitteeMapping> MasCommitteeMappings { get; set; }

        [DataMember]
        public virtual MasPurchaseRegular MasPurchaseRegular { get; set; }

		[DataMember]
        public virtual MasPurchaseMethod MasPurchaseMethod { get; set; }
    }
}